/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package myftp.core.view.listener;

import javax.swing.JList;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import myftp.app.model.ConnexionInfoModel;

/**
 *
 * @author CAVARLE Glenn, LUCAS Stéphane
 * Listener de selection d'un des serveurs
 */
public class ServerListListener implements ListSelectionListener {

    public ConnexionInfoModel[] serverList;

    public ServerListListener(ConnexionInfoModel[] list) {
        this.serverList = list;
    }

    public void valueChanged(ListSelectionEvent e) {
        /* Récupération de l'index du serveur séléctionné */
        int index = ((JList) e.getSource()).getSelectedIndex();
    }
}
